<me:ChartExBase x:Class="WPFExcelReport.Chart.ChartEx0004"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"  
       xmlns:chart="clr-namespace:De.TorstenMandelkow.MetroChart;assembly=De.TorstenMandelkow.MetroChart" 
             xmlns:ucd="clr-namespace:ReflectionStudio.Controls;assembly=ReflectionStudio.Controls"   
                xmlns:me="clr-namespace:WPFExcelReport.Chart"
        Loaded="ChartEx_Loaded">
    <me:ChartExBase.Resources>
        <ucd:BoolToVisibilityConverter  x:Key="bv"/>
        <ucd:StringToBrushConverter x:Key="StringToBrushConverter" />
    </me:ChartExBase.Resources>
    <Grid x:Name="maingrid">
        <Grid.RowDefinitions>
            <RowDefinition Height="1*"/>
        </Grid.RowDefinitions>
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="Auto"></ColumnDefinition>
            <ColumnDefinition Width="1*"></ColumnDefinition>
        </Grid.ColumnDefinitions>
        <Expander  Grid.Column="0" Header="{Binding Source={Localization:Translate Word=数据}}" ExpandDirection="Down" IsExpanded="True">
            <Grid VerticalAlignment="Top">
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="Auto"></ColumnDefinition>
                    <ColumnDefinition Width="Auto"></ColumnDefinition>
                    <ColumnDefinition Width="Auto"></ColumnDefinition>
                    <ColumnDefinition Width="Auto"></ColumnDefinition>
                    <ColumnDefinition Width="Auto"></ColumnDefinition>
                </Grid.ColumnDefinitions>
                <Grid Grid.Row="0" Grid.Column="0" Visibility="{Binding IsS1, Converter={StaticResource ResourceKey=bv}}">
                    <Grid.RowDefinitions>
                        <RowDefinition Height="Auto"/>
                        <RowDefinition Height="1*"/>
                    </Grid.RowDefinitions>
                    <TextBlock Grid.Row="0" Grid.Column="0" Grid.ColumnSpan="2" Text="{Binding S1}" Style="{StaticResource SectionHeaderSmallTextStyle}" />
                    <ListBox Grid.Row="1" Grid.Column="0"  
                             MaxHeight="500"
                             ItemContainerStyle="{StaticResource ListBoxItemStyle}"
                             ItemsSource="{Binding Path=DATA1}" 
                             SelectedItem="{Binding Path=SelectedItem, Mode=TwoWay}">
                        <ListBox.ItemTemplate>
                            <DataTemplate>
                                <Grid>
                                    <Grid.ColumnDefinitions>
                                        <ColumnDefinition Width="auto" />
                                        <ColumnDefinition Width="*" />
                                    </Grid.ColumnDefinitions>
                                    <TextBlock Grid.Column="0" Text="{Binding Path=Category}" />
                                    <TextBox Width="50" Background="White" Margin="0 0 0 0" BorderBrush="DarkGray" Grid.Column="1" HorizontalAlignment="Right" Text="{Binding Path=Number, Mode=TwoWay}" />
                                </Grid>
                            </DataTemplate>
                        </ListBox.ItemTemplate>
                    </ListBox>
                </Grid>
                <Grid Grid.Row="0" Grid.Column="1" Visibility="{Binding IsS2, Converter={StaticResource ResourceKey=bv}}">
                    <Grid.RowDefinitions>
                        <RowDefinition Height="Auto"/>
                        <RowDefinition Height="1*"/>
                    </Grid.RowDefinitions>
                    <TextBlock Grid.Row="0" Grid.Column="0" Grid.ColumnSpan="2" Text="{Binding S2}" Style="{StaticResource SectionHeaderSmallTextStyle}" />
                    <ListBox Grid.Row="1" Grid.Column="0"   
                             MaxHeight="500"
                             ItemContainerStyle="{StaticResource ListBoxItemStyle}"
                             ItemsSource="{Binding Path=DATA2}" 
                             SelectedItem="{Binding Path=SelectedItem, Mode=TwoWay}">
                        <ListBox.ItemTemplate>
                            <DataTemplate>
                                <Grid>
                                    <Grid.ColumnDefinitions>
                                        <ColumnDefinition Width="auto" />
                                        <ColumnDefinition Width="*" />
                                    </Grid.ColumnDefinitions>
                                    <TextBlock Grid.Column="0" Text="{Binding Path=Category}" />
                                    <TextBox Width="50" Background="White" Margin="0 0 0 0" BorderBrush="DarkGray" Grid.Column="1" HorizontalAlignment="Right" Text="{Binding Path=Number, Mode=TwoWay}" />
                                </Grid>
                            </DataTemplate>
                        </ListBox.ItemTemplate>
                    </ListBox>
                </Grid>
                <Grid Grid.Row="0" Grid.Column="2" Visibility="{Binding IsS3, Converter={StaticResource ResourceKey=bv}}">
                    <Grid.RowDefinitions>
                        <RowDefinition Height="Auto"/>
                        <RowDefinition Height="1*"/>
                    </Grid.RowDefinitions>
                    <TextBlock Grid.Row="0" Grid.Column="0" Grid.ColumnSpan="2" Text="{Binding S3}" Style="{StaticResource SectionHeaderSmallTextStyle}" />
                    <ListBox Grid.Row="1" Grid.Column="0"   
                             MaxHeight="500"
                             ItemContainerStyle="{StaticResource ListBoxItemStyle}"
                             ItemsSource="{Binding Path=DATA3}" 
                             SelectedItem="{Binding Path=SelectedItem, Mode=TwoWay}">
                        <ListBox.ItemTemplate>
                            <DataTemplate>
                                <Grid>
                                    <Grid.ColumnDefinitions>
                                        <ColumnDefinition Width="auto" />
                                        <ColumnDefinition Width="*" />
                                    </Grid.ColumnDefinitions>
                                    <TextBlock Grid.Column="0" Text="{Binding Path=Category}" />
                                    <TextBox Width="50" Background="White" Margin="0 0 0 0" BorderBrush="DarkGray" Grid.Column="1" HorizontalAlignment="Right" Text="{Binding Path=Number, Mode=TwoWay}" />
                                </Grid>
                            </DataTemplate>
                        </ListBox.ItemTemplate>
                    </ListBox>

                </Grid>
                <Grid Grid.Row="0" Grid.Column="3" Visibility="{Binding IsS4, Converter={StaticResource ResourceKey=bv}}">
                    <Grid.RowDefinitions>
                        <RowDefinition Height="Auto"/>
                        <RowDefinition Height="1*"/>
                    </Grid.RowDefinitions>
                    <TextBlock Grid.Row="0" Grid.Column="0" Grid.ColumnSpan="2" Text="{Binding S4}" Style="{StaticResource SectionHeaderSmallTextStyle}" />
                    <ListBox Grid.Row="1" Grid.Column="0"  
                             MaxHeight="500"
                             ItemContainerStyle="{StaticResource ListBoxItemStyle}"
                             ItemsSource="{Binding Path=DATA4}" 
                             SelectedItem="{Binding Path=SelectedItem, Mode=TwoWay}">
                        <ListBox.ItemTemplate>
                            <DataTemplate>
                                <Grid>
                                    <Grid.ColumnDefinitions>
                                        <ColumnDefinition Width="auto" />
                                        <ColumnDefinition Width="*" />
                                    </Grid.ColumnDefinitions>
                                    <TextBlock Grid.Column="0" Text="{Binding Path=Category}" />
                                    <TextBox Width="50" Background="White" Margin="0 0 0 0" BorderBrush="DarkGray" Grid.Column="1" HorizontalAlignment="Right" Text="{Binding Path=Number, Mode=TwoWay}" />
                                </Grid>
                            </DataTemplate>
                        </ListBox.ItemTemplate>
                    </ListBox>

                </Grid>
                <Grid Grid.Row="0" Grid.Column="4" Visibility="{Binding IsS5, Converter={StaticResource ResourceKey=bv}}">
                    <Grid.RowDefinitions>
                        <RowDefinition Height="Auto"/>
                        <RowDefinition Height="1*"/>
                    </Grid.RowDefinitions>
                    <TextBlock Grid.Row="0" Grid.Column="0" Grid.ColumnSpan="2" Text="{Binding S5}" Style="{StaticResource SectionHeaderSmallTextStyle}" />
                    <ListBox Grid.Row="1" Grid.Column="0"   
                             MaxHeight="500"
                             ItemContainerStyle="{StaticResource ListBoxItemStyle}"
                             ItemsSource="{Binding Path=DATA5}" 
                             SelectedItem="{Binding Path=SelectedItem, Mode=TwoWay}">
                        <ListBox.ItemTemplate>
                            <DataTemplate>
                                <Grid>
                                    <Grid.ColumnDefinitions>
                                        <ColumnDefinition Width="auto" />
                                        <ColumnDefinition Width="*" />
                                    </Grid.ColumnDefinitions>
                                    <TextBlock Grid.Column="0" Text="{Binding Path=Category}" />
                                    <TextBox Width="50" Background="White" Margin="0 0 0 0" BorderBrush="DarkGray" Grid.Column="1" HorizontalAlignment="Right" Text="{Binding Path=Number, Mode=TwoWay}" />
                                </Grid>
                            </DataTemplate>
                        </ListBox.ItemTemplate>
                    </ListBox>
                </Grid>
            </Grid>
        </Expander>
        <TabControl   Grid.Column="1" HorizontalAlignment="Stretch" HorizontalContentAlignment="Stretch" 
                                VerticalAlignment="Stretch" VerticalContentAlignment="Stretch">

            <TabItem Header="饼图"  Visibility="{Binding IsChart00, Converter={StaticResource ResourceKey=bv}}">
                <Grid>
                    <Grid.RowDefinitions>
                        <RowDefinition Height="Auto"/>
                        <RowDefinition Height="1*"/>
                    </Grid.RowDefinitions>
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="1*"></ColumnDefinition>
                    </Grid.ColumnDefinitions>
                    <WrapPanel>
                        <CheckBox IsChecked="{Binding Path=IsRowColumnSwitched, Mode=TwoWay}">
                            <TextBlock Text="{Binding Source={Localization:Translate Word=坐标转换}}" Style="{StaticResource ContentTextStyle}" />
                        </CheckBox>
                        <CheckBox IsChecked="{Binding Path=IsTitleVisible, Mode=TwoWay}">
                            <TextBlock Text="{Binding Source={Localization:Translate Word=标题可见}}" Style="{StaticResource ContentTextStyle}"/>
                        </CheckBox>
                        <CheckBox IsChecked="{Binding Path=IsLegendVisible, Mode=TwoWay}">
                            <TextBlock Text="{Binding Source={Localization:Translate Word=图列可见}}" Style="{StaticResource ContentTextStyle}" />
                        </CheckBox>
                        <CheckBox IsChecked="{Binding Path=DarkLayout, Mode=TwoWay}">
                            <TextBlock Text="{Binding Source={Localization:Translate Word=深色}}" Style="{StaticResource ContentTextStyle}" />
                        </CheckBox>
                    </WrapPanel>
                    <chart:PieChart Grid.Row="1" 
                                       Style="{StaticResource ChartStyleVariableSize}"
                                            IsSleep="{Binding IsSleep}" 
                                        ChartTitle="{Binding ChartTitle}"    
                                        ChartSubTitle="{Binding ChartSubTitle}" 
                                        Palette="{Binding Path=SelectedPalette.Value}"
                                        FontSize="{Binding Path=SelectedFontSize}"
                                        IsRowColumnSwitched="{Binding Path=IsRowColumnSwitched}"
                                        ChartTitleVisibility="{Binding Path=IsTitleVisible, Converter={StaticResource bv}}"
                                        ChartLegendVisibility="{Binding Path=IsLegendVisible, Converter={StaticResource bv}}"
                                        ToolTipFormat="{Binding Path=ToolTipFormat}" 
                                        Foreground="{Binding Path=Foreground}" 
                                        Background="{Binding Path=Background}"
                                        SelectedItem="{Binding Path=SelectedItem, Mode=TwoWay}"
                                        SelectedBrush="{Binding Path=SelectedBrush, Converter={StaticResource StringToBrushConverter}}"    
                                       SeriesSource="{Binding Path=Series}">
                        <chart:PieChart.SeriesTemplate>
                            <DataTemplate>
                                <chart:ChartSeries  SeriesTitle="{Binding Path=SeriesDisplayName}" DisplayMember="Category"  ValueMember="Number" ItemsSource="{Binding Path=Items}" />
                            </DataTemplate>
                        </chart:PieChart.SeriesTemplate>
                    </chart:PieChart>
                </Grid>
            </TabItem>
            <TabItem Header="堆栈图"  Visibility="{Binding IsChart01, Converter={StaticResource ResourceKey=bv}}">
                <Grid>
                    <Grid.RowDefinitions>
                        <RowDefinition Height="Auto"/>
                        <RowDefinition Height="1*"/>
                    </Grid.RowDefinitions>
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="1*"></ColumnDefinition>
                        <ColumnDefinition Width="1*"></ColumnDefinition>
                    </Grid.ColumnDefinitions>
                    <WrapPanel Grid.Row="0" Grid.Column="0">
                        <CheckBox IsChecked="{Binding Path=IsRowColumnSwitched, Mode=TwoWay}">
                            <TextBlock Text="{Binding Source={Localization:Translate Word=坐标转换}}" Style="{StaticResource ContentTextStyle}" />
                        </CheckBox>
                        <CheckBox IsChecked="{Binding Path=IsTitleVisible, Mode=TwoWay}">
                            <TextBlock Text="{Binding Source={Localization:Translate Word=标题可见}}" Style="{StaticResource ContentTextStyle}"/>
                        </CheckBox>
                        <CheckBox IsChecked="{Binding Path=IsLegendVisible, Mode=TwoWay}">
                            <TextBlock Text="{Binding Source={Localization:Translate Word=图列可见}}" Style="{StaticResource ContentTextStyle}" />
                        </CheckBox>
                        <CheckBox IsChecked="{Binding Path=DarkLayout, Mode=TwoWay}">
                            <TextBlock Text="{Binding Source={Localization:Translate Word=深色}}" Style="{StaticResource ContentTextStyle}" />
                        </CheckBox>
                    </WrapPanel>
                    <chart:StackedColumnChart Grid.Row="1" Grid.Column="0"
                            Style="{StaticResource ChartStyleVariableSize}"
                                                  
                             ChartTitle="{Binding Path=ChartTitle}"
                             ChartSubTitle="{Binding Path=ChartSubTitle}"   
                             IsSleep="{Binding IsSleep}" 
                            Palette="{Binding Path=SelectedPalette.Value}"
                            FontSize="{Binding Path=SelectedFontSize}"
                            IsRowColumnSwitched="{Binding Path=IsRowColumnSwitched}"
                            ChartTitleVisibility="{Binding Path=IsTitleVisible, Converter={StaticResource BooleanToVisibilityConverter}}"
                            ChartLegendVisibility="{Binding Path=IsLegendVisible, Converter={StaticResource BooleanToVisibilityConverter}}"
                            ToolTipFormat="{Binding Path=ToolTipFormat}"
                            Foreground="{Binding Path=Foreground}" 
                            Background="{Binding Path=Background}"                 
                            SelectedItem="{Binding Path=SelectedItem, Mode=TwoWay}"
                            SelectedBrush="{Binding Path=SelectedBrush, Converter={StaticResource StringToBrushConverter}}" 
                            SeriesSource="{Binding Path=Series}">
                        <chart:StackedColumnChart.SeriesTemplate>
                            <DataTemplate>
                                <chart:ChartSeries  SeriesTitle="{Binding Path=SeriesDisplayName}"    DisplayMember="Category"      ValueMember="Number"  ItemsSource="{Binding Path=Items}" />
                            </DataTemplate>
                        </chart:StackedColumnChart.SeriesTemplate>
                    </chart:StackedColumnChart>
                    <chart:StackedColumn100Chart  Grid.Row="1" Grid.Column="1" 
                                                      IsSleep="{Binding IsSleep}"                                                   
                            ChartTitle="{Binding Path=ChartTitle}"
                            ChartSubTitle="{Binding Path=ChartSubTitle}"   
                            Palette="{Binding Path=SelectedPalette.Value}"
                            FontSize="{Binding Path=SelectedFontSize}"
                            IsRowColumnSwitched="{Binding Path=IsRowColumnSwitched}"
                            ChartTitleVisibility="{Binding Path=IsTitleVisible, Converter={StaticResource BooleanToVisibilityConverter}}"
                            ChartLegendVisibility="{Binding Path=IsLegendVisible, Converter={StaticResource BooleanToVisibilityConverter}}"
                            ToolTipFormat="{Binding Path=ToolTipFormat}"
                            Foreground="{Binding Path=Foreground}" 
                            Background="{Binding Path=Background}"                 
                            SelectedItem="{Binding Path=SelectedItem, Mode=TwoWay}"
                            SelectedBrush="{Binding Path=SelectedBrush, Converter={StaticResource StringToBrushConverter}}" 
                            SeriesSource="{Binding Path=Series}">
                        <chart:StackedColumn100Chart.SeriesTemplate>
                            <DataTemplate>
                                <chart:ChartSeries  SeriesTitle="{Binding Path=SeriesDisplayName}"    DisplayMember="Category"      ValueMember="Number"  ItemsSource="{Binding Path=Items}" />
                            </DataTemplate>
                        </chart:StackedColumn100Chart.SeriesTemplate>
                    </chart:StackedColumn100Chart>
                </Grid>
            </TabItem>
            <TabItem Header="柱状图" Visibility="{Binding IsChart02, Converter={StaticResource ResourceKey=bv}}">
                <Grid>
                    <Grid.RowDefinitions>
                        <RowDefinition Height="Auto"/>
                        <RowDefinition Height="1*"/>
                    </Grid.RowDefinitions>
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="Auto"></ColumnDefinition>
                    </Grid.ColumnDefinitions>
                    <WrapPanel Grid.Row="0" Grid.Column="0">
                        <CheckBox IsChecked="{Binding Path=IsRowColumnSwitched, Mode=TwoWay}">
                            <TextBlock Text="{Binding Source={Localization:Translate Word=坐标转换}}" Style="{StaticResource ContentTextStyle}" />
                        </CheckBox>
                        <CheckBox IsChecked="{Binding Path=IsTitleVisible, Mode=TwoWay}">
                            <TextBlock Text="{Binding Source={Localization:Translate Word=标题可见}}" Style="{StaticResource ContentTextStyle}"/>
                        </CheckBox>
                        <CheckBox IsChecked="{Binding Path=IsLegendVisible, Mode=TwoWay}">
                            <TextBlock Text="{Binding Source={Localization:Translate Word=图列可见}}" Style="{StaticResource ContentTextStyle}" />
                        </CheckBox>
                        <CheckBox IsChecked="{Binding Path=DarkLayout, Mode=TwoWay}">
                            <TextBlock Text="{Binding Source={Localization:Translate Word=深色}}" Style="{StaticResource ContentTextStyle}" />
                        </CheckBox>
                    </WrapPanel>
                    <chart:ClusteredColumnChart   Grid.Row="1" Grid.Column="0"  
                                IsSleep="{Binding IsSleep}" 
                                Style="{StaticResource ChartStyleVariableSize}"
                                ChartTitle="{Binding Path=ChartTitle}"
                                ChartSubTitle="{Binding Path=ChartSubTitle}"               
                                Palette="{Binding Path=SelectedPalette.Value}"
                                FontSize="{Binding Path=SelectedFontSize}"
                                IsRowColumnSwitched="{Binding Path=IsRowColumnSwitched}"
                                ChartTitleVisibility="{Binding Path=IsTitleVisible, Converter={StaticResource BooleanToVisibilityConverter}}"
                                ChartLegendVisibility="{Binding Path=IsLegendVisible, Converter={StaticResource BooleanToVisibilityConverter}}"
                                ToolTipFormat="{Binding Path=ToolTipFormat}"
                                Foreground="{Binding Path=Foreground}" 
                                Background="{Binding Path=Background}"                 
                                SelectedItem="{Binding Path=SelectedItem, Mode=TwoWay}"
                                SelectedBrush="{Binding Path=SelectedBrush, Converter={StaticResource StringToBrushConverter}}" 
                                SeriesSource="{Binding Path=Series}">
                        <chart:ClusteredColumnChart.SeriesTemplate>
                            <DataTemplate>
                                <chart:ChartSeries  SeriesTitle="{Binding Path=SeriesDisplayName}"    DisplayMember="Category"      ValueMember="Number"  ItemsSource="{Binding Path=Items}" />
                            </DataTemplate>
                        </chart:ClusteredColumnChart.SeriesTemplate>
                    </chart:ClusteredColumnChart>
                </Grid>
            </TabItem>
            <TabItem Header="条型图" Visibility="{Binding IsChart03, Converter={StaticResource ResourceKey=bv}}">
                <Grid>
                    <Grid.RowDefinitions>
                        <RowDefinition Height="Auto"/>
                        <RowDefinition Height="1*"/>
                    </Grid.RowDefinitions>
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="Auto"></ColumnDefinition>
                        <ColumnDefinition Width="Auto"></ColumnDefinition>
                        <ColumnDefinition Width="Auto"></ColumnDefinition>
                    </Grid.ColumnDefinitions>
                    <WrapPanel Grid.Row="0" Grid.Column="0">
                        <CheckBox IsChecked="{Binding Path=IsRowColumnSwitched, Mode=TwoWay}">
                            <TextBlock Text="{Binding Source={Localization:Translate Word=坐标转换}}" Style="{StaticResource ContentTextStyle}" />
                        </CheckBox>
                        <CheckBox IsChecked="{Binding Path=IsTitleVisible, Mode=TwoWay}">
                            <TextBlock Text="{Binding Source={Localization:Translate Word=标题可见}}" Style="{StaticResource ContentTextStyle}"/>
                        </CheckBox>
                        <CheckBox IsChecked="{Binding Path=IsLegendVisible, Mode=TwoWay}">
                            <TextBlock Text="{Binding Source={Localization:Translate Word=图列可见}}" Style="{StaticResource ContentTextStyle}" />
                        </CheckBox>
                        <CheckBox IsChecked="{Binding Path=DarkLayout, Mode=TwoWay}">
                            <TextBlock Text="{Binding Source={Localization:Translate Word=深色}}" Style="{StaticResource ContentTextStyle}" />
                        </CheckBox>
                    </WrapPanel>
                    <chart:ClusteredBarChart  Grid.Row="1" Grid.Column="0"
                            Style="{StaticResource ChartStyleVariableSize}"
                                                        IsSleep="{Binding IsSleep}" 
                            ChartTitle="{Binding Path=ChartTitle}"
                            ChartSubTitle="{Binding Path=ChartSubTitle}"  
                            Palette="{Binding Path=SelectedPalette.Value}"
                            FontSize="{Binding Path=SelectedFontSize}"
                            IsRowColumnSwitched="{Binding Path=IsRowColumnSwitched}"
                            ChartTitleVisibility="{Binding Path=IsTitleVisible, Converter={StaticResource BooleanToVisibilityConverter}}"
                            ChartLegendVisibility="{Binding Path=IsLegendVisible, Converter={StaticResource BooleanToVisibilityConverter}}"
                            ToolTipFormat="{Binding Path=ToolTipFormat}"
                            Foreground="{Binding Path=Foreground}" 
                            Background="{Binding Path=Background}" 
                            SelectedItem="{Binding Path=SelectedItem, Mode=TwoWay}"
                            SelectedBrush="{Binding Path=SelectedBrush, Converter={StaticResource StringToBrushConverter}}"   
                            SeriesSource="{Binding Path=Series}">
                        <chart:ClusteredBarChart.SeriesTemplate>
                            <DataTemplate>
                                <chart:ChartSeries SeriesTitle="{Binding Path=SeriesDisplayName}"  DisplayMember="Category" ValueMember="Number" ItemsSource="{Binding Path=Items}" />
                            </DataTemplate>
                        </chart:ClusteredBarChart.SeriesTemplate>
                    </chart:ClusteredBarChart>
                    <chart:StackedBarChart   Grid.Row="1" Grid.Column="1" 
                                                 IsSleep="{Binding IsSleep}"                                                   
                            Style="{StaticResource ChartStyleVariableSize}" ChartTitle="{Binding Path=ChartTitle}"  ChartSubTitle="{Binding Path=ChartSubTitle}" Palette="{Binding Path=SelectedPalette.Value}"
                            FontSize="{Binding Path=SelectedFontSize}"
                            IsRowColumnSwitched="{Binding Path=IsRowColumnSwitched}"
                            ChartTitleVisibility="{Binding Path=IsTitleVisible, Converter={StaticResource BooleanToVisibilityConverter}}"
                            ChartLegendVisibility="{Binding Path=IsLegendVisible, Converter={StaticResource BooleanToVisibilityConverter}}"
                            ToolTipFormat="{Binding Path=ToolTipFormat}"
                            Foreground="{Binding Path=Foreground}" 
                            Background="{Binding Path=Background}"                 
                            SelectedItem="{Binding Path=SelectedItem, Mode=TwoWay}"
                            SelectedBrush="{Binding Path=SelectedBrush, Converter={StaticResource StringToBrushConverter}}" 
                            SeriesSource="{Binding Path=Series}">
                        <chart:StackedBarChart.SeriesTemplate>
                            <DataTemplate>
                                <chart:ChartSeries SeriesTitle="{Binding Path=SeriesDisplayName}"  DisplayMember="Category" ValueMember="Number" ItemsSource="{Binding Path=Items}" />
                            </DataTemplate>
                        </chart:StackedBarChart.SeriesTemplate>
                    </chart:StackedBarChart>
                    <chart:StackedBar100Chart Grid.Row="1" Grid.Column="2"
                                Style="{StaticResource ChartStyleVariableSize}"
                                IsSleep="{Binding IsSleep}"                                                   
                                 ChartTitle="{Binding Path=ChartTitle}"
                                ChartSubTitle="{Binding Path=ChartSubTitle}"
                                Palette="{Binding Path=SelectedPalette.Value}"
                                FontSize="{Binding Path=SelectedFontSize}"
                                IsRowColumnSwitched="{Binding Path=IsRowColumnSwitched}"
                                ChartTitleVisibility="{Binding Path=IsTitleVisible, Converter={StaticResource BooleanToVisibilityConverter}}"
                                ChartLegendVisibility="{Binding Path=IsLegendVisible, Converter={StaticResource BooleanToVisibilityConverter}}"
                                ToolTipFormat="{Binding Path=ToolTipFormat}"
                                Foreground="{Binding Path=Foreground}" 
                                Background="{Binding Path=Background}"                 
                                SelectedItem="{Binding Path=SelectedItem, Mode=TwoWay}"
                                SelectedBrush="{Binding Path=SelectedBrush, Converter={StaticResource StringToBrushConverter}}" 
                                SeriesSource="{Binding Path=Series}">
                        <chart:StackedBar100Chart.SeriesTemplate>
                            <DataTemplate>
                                <chart:ChartSeries SeriesTitle="{Binding Path=SeriesDisplayName}"  DisplayMember="Category" ValueMember="Number" ItemsSource="{Binding Path=Items}" />
                            </DataTemplate>
                        </chart:StackedBar100Chart.SeriesTemplate>
                    </chart:StackedBar100Chart>
                </Grid>
            </TabItem>
            <TabItem Header="仪表盘" Visibility="{Binding IsChart04, Converter={StaticResource ResourceKey=bv}}">
                <Grid>
                    <Grid.RowDefinitions>
                        <RowDefinition Height="Auto"/>
                        <RowDefinition Height="1*"/>
                    </Grid.RowDefinitions>
                    <WrapPanel Grid.Row="0" Grid.Column="0">
                        <CheckBox IsChecked="{Binding Path=IsRowColumnSwitched, Mode=TwoWay}">
                            <TextBlock Text="{Binding Source={Localization:Translate Word=坐标转换}}" Style="{StaticResource ContentTextStyle}" />
                        </CheckBox>
                        <CheckBox IsChecked="{Binding Path=IsTitleVisible, Mode=TwoWay}">
                            <TextBlock Text="{Binding Source={Localization:Translate Word=标题可见}}" Style="{StaticResource ContentTextStyle}"/>
                        </CheckBox>
                        <CheckBox IsChecked="{Binding Path=IsLegendVisible, Mode=TwoWay}">
                            <TextBlock Text="{Binding Source={Localization:Translate Word=图列可见}}" Style="{StaticResource ContentTextStyle}" />
                        </CheckBox>
                        <CheckBox IsChecked="{Binding Path=DarkLayout, Mode=TwoWay}">
                            <TextBlock Text="{Binding Source={Localization:Translate Word=深色}}" Style="{StaticResource ContentTextStyle}" />
                        </CheckBox>
                    </WrapPanel>
                    <chart:RadialGaugeChart   Grid.Row="1"
                            Style="{StaticResource ChartStyleVariableSize}"
IsSleep="{Binding IsSleep}"                                                                                                 
                            ChartTitle="{Binding Path=ChartTitle}"
                            ChartSubTitle="{Binding Path=ChartSubTitle}"
                            Palette="{Binding Path=SelectedPalette.Value}"
                            FontSize="{Binding Path=SelectedFontSize}"
                            IsRowColumnSwitched="{Binding Path=IsRowColumnSwitched}"
                            ChartTitleVisibility="{Binding Path=IsTitleVisible, Converter={StaticResource BooleanToVisibilityConverter}}"
                            ChartLegendVisibility="{Binding Path=IsLegendVisible, Converter={StaticResource BooleanToVisibilityConverter}}"
                            ToolTipFormat="{Binding Path=ToolTipFormat}"
                            Foreground="{Binding Path=Foreground}" 
                            Background="{Binding Path=Background}"                 
                            SelectedItem="{Binding Path=SelectedItem, Mode=TwoWay}"
                            SelectedBrush="{Binding Path=SelectedBrush, Converter={StaticResource StringToBrushConverter}}" 
                            SeriesSource="{Binding Path=Series}">
                        <chart:RadialGaugeChart.SeriesTemplate>
                            <DataTemplate>
                                <chart:ChartSeries  SeriesTitle="{Binding Path=SeriesDisplayName}"  DisplayMember="Category"  ValueMember="Number"  ItemsSource="{Binding Path=Items}" />
                            </DataTemplate>
                        </chart:RadialGaugeChart.SeriesTemplate>
                    </chart:RadialGaugeChart>
                </Grid>
            </TabItem>
            <TabItem Header="饼圈图"  Visibility="{Binding IsChart05, Converter={StaticResource ResourceKey=bv}}">
                <Grid>
                    <Grid.RowDefinitions>
                        <RowDefinition Height="Auto"/>
                        <RowDefinition Height="1*"/>
                    </Grid.RowDefinitions>
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="1*"></ColumnDefinition>
                    </Grid.ColumnDefinitions>
                    <WrapPanel Grid.Row="0" Grid.Column="0">
                        <CheckBox IsChecked="{Binding Path=IsRowColumnSwitched, Mode=TwoWay}">
                            <TextBlock Text="{Binding Source={Localization:Translate Word=坐标转换}}" Style="{StaticResource ContentTextStyle}" />
                        </CheckBox>
                        <CheckBox IsChecked="{Binding Path=IsTitleVisible, Mode=TwoWay}">
                            <TextBlock Text="{Binding Source={Localization:Translate Word=标题可见}}" Style="{StaticResource ContentTextStyle}"/>
                        </CheckBox>
                        <CheckBox IsChecked="{Binding Path=IsLegendVisible, Mode=TwoWay}">
                            <TextBlock Text="{Binding Source={Localization:Translate Word=图列可见}}" Style="{StaticResource ContentTextStyle}" />
                        </CheckBox>
                        <CheckBox IsChecked="{Binding Path=DarkLayout, Mode=TwoWay}">
                            <TextBlock Text="{Binding Source={Localization:Translate Word=深色}}" Style="{StaticResource ContentTextStyle}" />
                        </CheckBox>
                    </WrapPanel>
                    <chart:DoughnutChart  Grid.Row="1" Grid.Column="1"
                                    Style="{StaticResource ChartStyleVariableSize}"
                                                IsSleep="{Binding IsSleep}" 
                                     ChartTitle="{Binding ChartTitle}"                            
                                    ChartSubTitle="{Binding ChartSubTitle}"
                                    Palette="{Binding Path=SelectedPalette.Value}"
                                    FontSize="{Binding Path=SelectedFontSize}"
                                    IsRowColumnSwitched="{Binding Path=IsRowColumnSwitched}"
                                    ChartTitleVisibility="{Binding Path=IsTitleVisible, Converter={StaticResource BooleanToVisibilityConverter}}"
                                    ChartLegendVisibility="{Binding Path=IsLegendVisible, Converter={StaticResource BooleanToVisibilityConverter}}"
                                    ToolTipFormat="{Binding Path=ToolTipFormat}"
                                    Foreground="{Binding Path=Foreground}" 
                                    Background="{Binding Path=Background}"                 
                                    InnerRadiusRatio="{Binding Path=SelectedDoughnutInnerRadiusRatio}"
                                    SelectedItem="{Binding Path=SelectedItem, Mode=TwoWay}"
                                    SeriesSource="{Binding Path=Series}">
                        <chart:DoughnutChart.SeriesTemplate>
                            <DataTemplate>
                                <chart:ChartSeries  SeriesTitle="{Binding Path=SeriesDisplayName}"    DisplayMember="Category"      ValueMember="Number"  ItemsSource="{Binding Path=Items}" />
                            </DataTemplate>
                        </chart:DoughnutChart.SeriesTemplate>
                    </chart:DoughnutChart>
                </Grid>
            </TabItem>
            <TabItem Header="仪表盘"  Visibility="{Binding IsS1, Converter={StaticResource ResourceKey=bv}}">
                <Grid>
                    <Grid.RowDefinitions>
                        <RowDefinition Height="Auto"/>
                        <RowDefinition Height="1*"/>
                    </Grid.RowDefinitions>
                    <WrapPanel Grid.Row="0" Grid.Column="0">
                        <CheckBox IsChecked="{Binding Path=IsRowColumnSwitched, Mode=TwoWay}">
                            <TextBlock Text="{Binding Source={Localization:Translate Word=坐标转换}}" Style="{StaticResource ContentTextStyle}" />
                        </CheckBox>
                        <CheckBox IsChecked="{Binding Path=IsTitleVisible, Mode=TwoWay}">
                            <TextBlock Text="{Binding Source={Localization:Translate Word=标题可见}}" Style="{StaticResource ContentTextStyle}"/>
                        </CheckBox>
                        <CheckBox IsChecked="{Binding Path=IsLegendVisible, Mode=TwoWay}">
                            <TextBlock Text="{Binding Source={Localization:Translate Word=图列可见}}" Style="{StaticResource ContentTextStyle}" />
                        </CheckBox>
                        <CheckBox IsChecked="{Binding Path=DarkLayout, Mode=TwoWay}">
                            <TextBlock Text="{Binding Source={Localization:Translate Word=深色}}" Style="{StaticResource ContentTextStyle}" />
                        </CheckBox>
                    </WrapPanel>
                    <chart:RadialGaugeChart  Grid.Row="1"
                            Style="{StaticResource ChartStyleVariableSize}"
IsSleep="{Binding IsSleep}"                                                                                                
                            ChartTitle="{Binding Path=ChartTitle1}"
                            ChartSubTitle="{Binding Path=ChartSubTitle1}"
                            Palette="{Binding Path=SelectedPalette.Value}"
                            FontSize="{Binding Path=SelectedFontSize}"
                            IsRowColumnSwitched="{Binding Path=IsRowColumnSwitched}"
                            ChartTitleVisibility="{Binding Path=IsTitleVisible, Converter={StaticResource BooleanToVisibilityConverter}}"
                            ChartLegendVisibility="{Binding Path=IsLegendVisible, Converter={StaticResource BooleanToVisibilityConverter}}"
                            ToolTipFormat="{Binding Path=ToolTipFormat}"
                            Foreground="{Binding Path=Foreground}" 
                            Background="{Binding Path=Background}"                 
                            SelectedItem="{Binding Path=SelectedItem, Mode=TwoWay}"
                            SelectedBrush="{Binding Path=SelectedBrush, Converter={StaticResource StringToBrushConverter}}" >
                        <chart:RadialGaugeChart.Series>
                            <chart:ChartSeries SeriesTitle="{Binding Path=ChartSubTitle1}"  DisplayMember="Category" ValueMember="Number"  ItemsSource="{Binding Path=DATA1}"></chart:ChartSeries>
                        </chart:RadialGaugeChart.Series>
                    </chart:RadialGaugeChart>
                </Grid>
            </TabItem>
            <TabItem Visibility="{Binding IsChart07, Converter={StaticResource ResourceKey=bv}}">
                <Grid>
                    <Grid.RowDefinitions>
                        <RowDefinition Height="Auto"/>
                        <RowDefinition Height="1*"/>
                    </Grid.RowDefinitions>
                    <WrapPanel Grid.Row="0" Grid.Column="0">
                        <CheckBox IsChecked="{Binding Path=IsRowColumnSwitched, Mode=TwoWay}">
                            <TextBlock Text="{Binding Source={Localization:Translate Word=坐标转换}}" Style="{StaticResource ContentTextStyle}" />
                        </CheckBox>
                        <CheckBox IsChecked="{Binding Path=IsTitleVisible, Mode=TwoWay}">
                            <TextBlock Text="{Binding Source={Localization:Translate Word=标题可见}}" Style="{StaticResource ContentTextStyle}"/>
                        </CheckBox>
                        <CheckBox IsChecked="{Binding Path=IsLegendVisible, Mode=TwoWay}">
                            <TextBlock Text="{Binding Source={Localization:Translate Word=图列可见}}" Style="{StaticResource ContentTextStyle}" />
                        </CheckBox>
                        <CheckBox IsChecked="{Binding Path=DarkLayout, Mode=TwoWay}">
                            <TextBlock Text="{Binding Source={Localization:Translate Word=深色}}" Style="{StaticResource ContentTextStyle}" />
                        </CheckBox>
                    </WrapPanel>
                </Grid>
            </TabItem>
            <TabItem  Visibility="{Binding IsChart08, Converter={StaticResource ResourceKey=bv}}">
                <Grid>
                    <Grid.RowDefinitions>
                        <RowDefinition Height="Auto"/>
                        <RowDefinition Height="1*"/>
                    </Grid.RowDefinitions>
                    <WrapPanel Grid.Row="0" Grid.Column="0">
                        <CheckBox IsChecked="{Binding Path=IsRowColumnSwitched, Mode=TwoWay}">
                            <TextBlock Text="{Binding Source={Localization:Translate Word=坐标转换}}" Style="{StaticResource ContentTextStyle}" />
                        </CheckBox>
                        <CheckBox IsChecked="{Binding Path=IsTitleVisible, Mode=TwoWay}">
                            <TextBlock Text="{Binding Source={Localization:Translate Word=标题可见}}" Style="{StaticResource ContentTextStyle}"/>
                        </CheckBox>
                        <CheckBox IsChecked="{Binding Path=IsLegendVisible, Mode=TwoWay}">
                            <TextBlock Text="{Binding Source={Localization:Translate Word=图列可见}}" Style="{StaticResource ContentTextStyle}" />
                        </CheckBox>
                        <CheckBox IsChecked="{Binding Path=DarkLayout, Mode=TwoWay}">
                            <TextBlock Text="{Binding Source={Localization:Translate Word=深色}}" Style="{StaticResource ContentTextStyle}" />
                        </CheckBox>
                    </WrapPanel>
                </Grid>
            </TabItem>
            <TabItem  Visibility="{Binding IsChart09, Converter={StaticResource ResourceKey=bv}}">
                <Grid>
                    <Grid.RowDefinitions>
                        <RowDefinition Height="Auto"/>
                        <RowDefinition Height="1*"/>
                    </Grid.RowDefinitions>
                    <WrapPanel Grid.Row="0" Grid.Column="0">
                        <CheckBox IsChecked="{Binding Path=IsRowColumnSwitched, Mode=TwoWay}">
                            <TextBlock Text="{Binding Source={Localization:Translate Word=坐标转换}}" Style="{StaticResource ContentTextStyle}" />
                        </CheckBox>
                        <CheckBox IsChecked="{Binding Path=IsTitleVisible, Mode=TwoWay}">
                            <TextBlock Text="{Binding Source={Localization:Translate Word=标题可见}}" Style="{StaticResource ContentTextStyle}"/>
                        </CheckBox>
                        <CheckBox IsChecked="{Binding Path=IsLegendVisible, Mode=TwoWay}">
                            <TextBlock Text="{Binding Source={Localization:Translate Word=图列可见}}" Style="{StaticResource ContentTextStyle}" />
                        </CheckBox>
                        <CheckBox IsChecked="{Binding Path=DarkLayout, Mode=TwoWay}">
                            <TextBlock Text="{Binding Source={Localization:Translate Word=深色}}" Style="{StaticResource ContentTextStyle}" />
                        </CheckBox>
                    </WrapPanel>
                </Grid>
            </TabItem>
        </TabControl>
    </Grid>
</me:ChartExBase>
